package cn.ming.leo.resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import cn.ming.leo.bean.vo.RequestJson;
import cn.ming.leo.service.BoxService;
import cn.ming.leo.utils.Message;

@RestController
@RequestMapping("/box")
public class BoxResource {
 
	@Autowired
	private BoxService boxService;

	@RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
	@ResponseBody
	public Message<String> updateStatus(@RequestBody RequestJson json) {
		return boxService.updateStatus(json.getId(), json.getStatus());
	}

}
